package com.tysong.qq.patterns;

import love.forte.simbot.api.message.events.GroupMsg;
import love.forte.simbot.api.sender.MsgSender;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Project: qq
 * @Author: Sunday
 * @Create: 2021-09-01 20:57
 **/

@Component("context")
public class Context {
    private final Strategy strategy;

    public Context(Strategy strategy){
        this.strategy = strategy;
    }

    public void executeStrategy(GroupMsg msg, MsgSender sender, String groupNumber, List<String> listName){
        strategy.doOperation(msg, sender, groupNumber, listName);
    }

    public void getMusicName(MsgSender sender, String groupNumber, String musicName) throws Exception {
        strategy.neteaseCloudMusic(sender, groupNumber, musicName);
    }
}
